<?php if (!defined('THINK_PATH')) exit(); global $isLogin;?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?=C('APP_NAME')?>-后台管理系统</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="/statics/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/statics/stylesheets/theme.css">
    <link rel="stylesheet" href="/statics/lib/font-awesome/css/font-awesome.css">

	<script src="/statics/arts/artDialog.source.js?skin=default"></script>
	<script src="/statics/arts/iframeTools.source.js"></script>
	<script src="/statics/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
	<script src="/statics/js/base.js" type="text/javascript"></script>
	<script type="text/javascript" src="/statics/lib/WdatePicker.js"></script>
	<link rel="stylesheet" href='/statics/css/lightbox.css'></link>
	<script type="text/javascript" src='/statics/js/lightbox.js'></script>
    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>
    
    <style>
		form {
			margin: 0;
		}
		textarea {
			display: block;
		}
		table {
	 		border:1px solid #dddddd
		}
	</style>
	<link rel="stylesheet" href="/statics/lib/themes/default/default.css" />
	<script charset="utf-8" src="/statics/lib/kindeditor-min.js"></script>
	<script charset="utf-8" src="/statics/lib/lang/zh_CN.js"></script>
	<script>
		var editor;
		KindEditor.ready(function(K) {
			editor = K.create('textarea[name="content"]', {
				allowFileManager : true,
				afterBlur:function(){
					   this.sync();
					},
			});
			K('input[name=getHtml]').click(function(e) {
				alert(editor.html());
			});
			K('input[name=isEmpty]').click(function(e) {
				alert(editor.isEmpty());
			});
			K('input[name=getText]').click(function(e) {
				alert(editor.text());
			});
			K('input[name=selectedHtml]').click(function(e) {
				alert(editor.selectedHtml());
			});
			K('input[name=setHtml]').click(function(e) {
				editor.html('<h3>Hello KindEditor</h3>');
			});
			K('input[name=setText]').click(function(e) {
				editor.text('<h3>Hello KindEditor</h3>');
			});
			K('input[name=insertHtml]').click(function(e) {
				editor.insertHtml('<strong>插入HTML</strong>');
			});
			K('input[name=appendHtml]').click(function(e) {
				editor.appendHtml('<strong>添加HTML</strong>');
			});
			K('input[name=clear]').click(function(e) {
				editor.html('');
			});
		});
	</script>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body>
		  
<?php if($isLogin && !I('get.ifm')){?>
<body class=""> 
  <!--<![endif]-->
  	<p style="width:0%;border:2px solid pink;margin:0px;position:absolute;top:0px;left:0px;z-index:100000" id="loadIngCent"></p>
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    <li><a href="#" class="hidden-phone visible-tablet visible-desktop ifrm" data-url="/sysmsg/showlogs" data-width="900" data-height="650" data-title="系统日志" data-params="" role="button">系统日志</a></li>
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i> <?=getLoginMsg()->username?>111
                            <i class="icon-caret-down"></i>
                        </a>
                        
                        <ul class="dropdown-menu">
                            <li><a tabindex="-1" href="javascript:void(0)" id="myaccount" class="ifrm" data-url="/user/usercenter" data-width="450" data-height="450" data-title="我的账户" data-params="">我的账户</a></li>
                            <li><a tabindex="-1" class="visible-phone" href="#">系统设置</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1"  href="/user/addAdmin" >新开帐号</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1" href="/user/loginout">注销</a></li>
                        </ul>
                    </li>
                </ul>
                <a class="brand" href=""><span class="second">铜人宝总管理系统</span></a>
        </div>
    </div>
    <script>loadCent('20%',100);</script>
    <div class="sidebar-nav">
		<?php
 $_current_c = explode('-',I('get.res') ?: '0-1'); $_icon_tags = C('icons'); foreach($menus AS $k=>$val){ foreach($val AS $key=>$value){ if(!$key){ ?>
		<a href="#accounts-menu-<?=$k?>" class="nav-header <?=$_current_c[0]==$k ? '' : 'collapsed'?>" data-toggle="collapse"><i class="<?=$_icon_tags[$k]?>"></i><?=$value['tip']?><i class="icon-chevron-up"></i></a>
		<ul id="accounts-menu-<?=$k?>"  class="nav nav-list <?=$_current_c[0]==$k ? 'in' : ''?> collapse">
        <?php }else{ ?>
            <li <?php echo $key==$_current_c[1] && $k==$_current_c[0] ? 'class="active"' : '';?>><a href="<?=$value['link'].'?res='.$k.'-'.$key?>"><?=$value['tip']?></a></li>
		<?php }}?>
		</ul>
		<?php }?>
    </div>
    <script>loadCent('30%',100);</script>
    <div class="content">
        <div class="header">
        	<!-- 
			<div class="stats">
				<p class="stat"><span class="number"><?=session('tj_life_regist')?></span>今日注册数</p>
				<p class="stat"><span class="number"><?=session('tj_life_port')?></span>今日订单数</p>
			</div> -->
			<!--<h1 class="page-title"><?=C('menus')[$_current_c[0]][$_current_c[1]]['tip']?></h1> -->
        </div>
			<ul class="breadcrumb">
				<li><a href="<?=C('menus')[$_current_c[0]][0]['link']?>"><?=C('menus')[$_current_c[0]][0]['tip']?></a> <span class="divider">/</span></li>
				<li class="active"><?=C('menus')[$_current_c[0]][$_current_c[1]]['tip']?></li>
			</ul>
        <div class="container-fluid">
            <div class="row-fluid">
            <script>loadCent('60%',100);</script>
<?php }?>
 <style>.setimg{	margin:-2px 5px 0 0 }</style><div class="row-fluid">	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>    <div class="well">        <button class="btn btn-primary ifrm" data-url="/user/addAdmin" data-width="720" data-height="420" data-title="添加管理员" data-params="" style="float:right;padding:3px 6px">添加管理员</button>		<table class="table">		      <thead>		        <tr>		          <th style="text-align:center;width:100px">序号id</th>		          <th style="text-align:center;width:170px">用户姓名</th>		          <th style="text-align:center;width:170px">角色</th>		          <th style="text-align:center;width:180px">邮箱</th>		          <th style="text-align:center;width:140px">注册时间</th>		      	  <th style="text-align:center;width:130px">操作</th>		        </tr>		      </thead>		      <tbody>		      	<?php if($getData){foreach($getData AS $key=>$val){ ?>		        <tr> 		          <td style="text-align:center;vertical-align:middle;"><?=$val['rid']?></td>		          <td style="text-align:center;vertical-align:middle;"><?=$val['username'] ?: '-'?></td>		          <td style="text-align:center;vertical-align:middle;"><?=$val['name'] ?: '-'?></td>		          <td style="text-align:center;vertical-align:middle;"><?=$val['email'] ?: '-'?></td>		          <td style="text-align:center;vertical-align:middle;"><?=date('Y-m-d H:i',$val['add_at'])?></td>		          <td style="text-align:center;vertical-align:middle;">		              <?php if($val['is_active']){?>					  	  <a href="/index/decate?custid=<?=$val['cust_id']?>&m=CustEntity" class="decate btn btn-danger" style="padding: 0px 4px;" role="button" title="冻结用户" data-toggle="modal"><i class="icon-eye-close"></i></a>&nbsp;&nbsp;					  <?php }else{ ?>					      <a href="/index/decate?custid=<?=$val['cust_id']?>&types=1&m=CustEntity" class="decate btn btn-warning" style="padding: 0px 4px;" role="button" title="解封用户" data-toggle="modal"><i class="icon-eye-open"></i></a>&nbsp;&nbsp;					  <?php }?>					  <a class="ifrm btn btn-info" href="javascript:void(0)" style="padding: 0px 4px;" data-url="/user/addAdmin/rid/<?=$val['rid']?>" data-width="720" data-height="420" data-title="修改用户信息" data-params=""><i class="icon-pencil"></i></a>&nbsp;&nbsp;&nbsp;				 </td>		        </tr>		        <?php }}else{?>		        	<tr><td style="text-align:center" colspan=7>暂无数据</td></tr>		        <?php }?>		      </tbody>		   </table>		   <span style="float:right;margin-top:-44px"><?=$page?></span>	</div></div><script>$(function(){	$('#setApply').change(function(){		if($(this).val() != '0'){			var strs = <?=json_encode($jsonArr)?>;			var html = '<select name="city" id="appCity" style="width:125px;margin-left:5px">';			for(var i=0;i<strs[$(this).val()].length;i++){				html += '<option value="'+strs[$(this).val()][i]['city']+'">'+strs[$(this).val()][i]['city']+'('+strs[$(this).val()][i]['cnt']+')</option>';			}			html += '</select>';			$('#appCity').remove();			$(html).insertAfter($('#setApply'));			<?php if(I('get.city')){?>			$('#appCity').val('<?=I('get.city')?>');			<?php }?>		}	}).trigger('change');	$('.decate').live('click',function(){		if(!window.confirm('确认'+$(this).attr('title')+'吗 ?')){			return false;		}		window.location = $(this).attr('href');	});	$('.setTag').click(function(){		if(!window.confirm('确认'+$(this).attr('title')+'吗 ?')){			return false;		}		window.location = $(this).attr('href');	});    $('.lineCount').click(function(){        art.dialog.open('/index/level/ifm/1/',        {            id: 'SETCHOSEID',            width: '100%',            height: '100%',            left: '0%',            top: '0%',            fixed: true,            resize: false,            drag: false,            title: '用户等级'        });    });})</script>
 <script>loadCent('80%',100);</script>
 <?php if($isLogin && !I('get.ifm')){?>
                    <footer>
                        <hr>
                        <p class="pull-right"> fx.com All Rights Reserved.</p>

                        <p>&copy; 2016 <a href=""><?=C('APP_NAME')?></a></p>
                    </footer>
            </div>
        </div>
    </div>
	<script type="text/html" id="notice">
		<div class="alert alert-info" style="display:none;margin:1px 0 5px 0;">
     	   	<button type="button" class="close" data-dismiss="alert">×</button>
     	   	<strong>温馨提示:</strong> <span class="maintips"></span>
   	 	</div>
	</script>
	<script src="/statics/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            if($.cookie('_sysdomain')){
            	var cookiePars = $.cookie('_sysdomain');
            	parmComb = cookiePars.split('@');
            	$('.row-fluid:first').prepend($('#notice').html());
            	$('.alert .maintips').html(parmComb[0]);
            	$('.alert').show(10,function(){
            			$.cookie('_sysdomain',null,{'path':'/'});
	            		setTimeout(function(){
	            			$('.alert').slideUp(600,function(){
	            				$('.alert').remove();
	            			});
	            			var list = window.parent.art.dialog.list;
	            			if(parmComb[1] != '0')
	            				window.parent.location = parmComb[1];
	            			else
	            				window.parent.location.reload();
	            			list['TIPCHOSEID'].close();
	            		},2000);
            		});
            }
        });
        $(function(){
        	$('.ifrm').live('click',function(){
        		opens($(this).data('url'),$(this).data('width'),$(this).data('height'),$(this).data('title'),$(this).data('params'));
        		return false;
        	});
        	$('.ifrm').each(function(){
           		$(this).attr('title',$(this).data('title'));
           	});
        	<?php if(!isset($_SESSION['tj_life']) || (time()-$_SESSION['tj_life'] > 3600)){?>
		   		//$.get('/index/getCountCj',{},function(){});
		   	<?php }?>
        })
    </script>
  </body>
</html>
<?php }else{?>
            </div>
        </div>
    </div>
	<script src="/statics/lib/bootstrap/js/bootstrap.js"></script>
	<script type="text/html" id="notice">
		<div class="alert alert-info" style="display:none;margin:1px 0 5px 0;">
     	   	<button type="button" class="close" data-dismiss="alert">×</button>
     	   	<strong>温馨提示:</strong> <span class="maintips"></span>
   	 	</div>
	</script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            if($.cookie('_sysdomain')){
            	var cookiePars = $.cookie('_sysdomain');
            	parmComb = cookiePars.split('@');
            	$('.row-fluid:first').prepend($('#notice').html());
            	$('.alert .maintips').html(parmComb[0]);
            	$('.alert').show(10,function(){
            			$.cookie('_sysdomain',null,{'path':'/'});
            			$.cookie('_sysdomain',null);
                		setTimeout(function(){
                			$('.alert').slideUp(600,function(){
                				$('.alert').remove();
    	            			var list = window.parent.art.dialog.list;
    	            			if(parmComb[1] != '0')
    	            				window.parent.location = parmComb[1];
    	            			else
    	            				window.parent.location.reload();
    	            			list['TIPCHOSEID'].close();
                			});
                		},2000);
            		});
            }
           	$('.ifrm').click(function(){
        		opens($(this).data('url'),$(this).data('width'),$(this).data('height'),$(this).data('title'),$(this).data('params'));
        		return false;
        	});
           	$('.ifrm').each(function(){
           		$(this).attr('title',$(this).data('title'));
           	});
        	<?php if(!isset($_SESSION['tj_life']) || (time()-$_SESSION['tj_life'] > 3600)){?>
		   		//$.get('/index/getCountCj',{},function(){});
		   	<?php }?>
        })
    </script>
  </body>
</html>
<?php }?>
<script>loadCent('100%',100);setTimeout(function(){$('#loadIngCent').fadeOut('fast')},800);</script>